package com.example.demo.mapper;

import com.example.demo.entity.ArticleInfo;
import com.example.demo.entity.vo.ArticleInfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleMapper {
    int add(ArticleInfo articleInfo);

    ArticleInfo getDetailByIdAndUid(@Param("id") Integer id,@Param("uid") Integer uid);

    int update(ArticleInfo articleInfo);

    ArticleInfoVO getDetail(@Param("id") Integer id);

    int addRCount(@Param("id")Integer id);

    List<ArticleInfo> getListByUid(@Param("uid") Integer uid);

    int del(@Param("id") Integer id,@Param("uid") Integer uid);

    List<ArticleInfo> getListByPage(@Param("pageSize") Integer pageSize,@Param("offset") Integer offset);

    Integer getCount();
}
